package com.wowangz.cms.systemmanage.databaseresource.pojo;

import com.wowangz.cms.syscore.pojo.BaseEntity;

public class DatabaseResource extends BaseEntity {

	private static final long serialVersionUID = -8158973532846402931L;
	private String ip;   //mysqlip
	private Long port;   //mysql端口号
	private String dbname;   //库名称
	private String username;   //用户名称
	private String password;   //用户密码
	private Long totalconn;   //设计接入总数
	private Long usedconn;   //已使用接入数
	
	//临时变量
	private Long olddbid;

	public Long getOlddbid() {
		return olddbid;
	}

	public void setOlddbid(Long olddbid) {
		this.olddbid = olddbid;
	}

	public void setIp(String value) {
		this.ip = value;
	}
	
	public String getIp() {
		return this.ip;
	}
	public void setPort(Long value) {
		this.port = value;
	}
	
	public Long getPort() {
		return this.port;
	}
	public void setDbname(String value) {
		this.dbname = value;
	}
	
	public String getDbname() {
		return this.dbname;
	}
	public void setUsername(String value) {
		this.username = value;
	}
	
	public String getUsername() {
		return this.username;
	}
	public void setPassword(String value) {
		this.password = value;
	}
	
	public String getPassword() {
		return this.password;
	}
	public void setTotalconn(Long value) {
		this.totalconn = value;
	}
	
	public Long getTotalconn() {
		return this.totalconn;
	}
	public void setUsedconn(Long value) {
		this.usedconn = value;
	}
	
	public Long getUsedconn() {
		return this.usedconn;
	}
	
	public Long getRestconn(){
		return this.totalconn - this.usedconn;
	}

}
